package com.lu.service.impl;

import com.lu.mapper.ShopMapper;
import com.lu.pojo.Shop;
import com.lu.service.ShopService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ShopServiceImpl implements ShopService {
    @Resource
    private ShopMapper shopMapper;
    @Override
    public List<Shop> getShop() {
        List<Shop> shop = shopMapper.getShop ( );

        return shop;
    }

    @Override
    public Shop findShopById(Integer sid) {
        Shop shopById = shopMapper.findShopById ( sid );
        return shopById;

    }

    @Override
    public int updateShop(Shop shop) {
        int i = shopMapper.updateShop ( shop );
        return i;
    }

    @Override
    public int del(Integer sid) {
        int del = shopMapper.del ( sid );

        return  del;
    }

    @Override
    public int add(Shop shop) {
        int add = shopMapper.add ( shop );
        return add;
    }
}
